/*******************************************
  Jose Andres Lara Vecino

  Author       : $$Author: cainlara@gmail.com $$
  Last CheckIn : $$Date: 2012-06-07 16:02:20 +0000 (Thu, 07 Jun 2012) $$
  Revision     : $$Revision: 56 $$
*******************************************/

package gui.suites;

import gui.suites.arbol.SuitesArbol;

import java.awt.BorderLayout;

import javax.swing.JPanel;
import javax.swing.JScrollPane;

/**
 * Panel contenedor para el arbol de suites.
 * 
 * @author jose.lara 07.06.2012
 */
public class SuitesArbolPanel extends JPanel {
    private static final long serialVersionUID = -180970859668932347L;
    
    private JScrollPane scrollPanel = null;
    private SuitesArbol arbol       = null; 
    
    public SuitesArbolPanel() {
        super();
        add(getScrollPanel(), BorderLayout.CENTER);
    }
    
    private JScrollPane getScrollPanel() {
        if(scrollPanel == null) {
            scrollPanel = new JScrollPane();
            scrollPanel.setViewportView(iniciarArbol());
        }
        return scrollPanel;
    }
    
    private SuitesArbol iniciarArbol() {
        if(arbol == null) {
            arbol = new SuitesArbol();
        }
        
        return arbol;
    }
    
    public SuitesArbol getArbol() {
        return arbol;
    }
    
}